<%@page import="org.apache.commons.lang.StringUtils"%>
<%@page import="org.apache.commons.lang.time.DateFormatUtils"%>
<%@page import="org.springframework.util.CollectionUtils"%>
<%@page import="java.util.Collection"%>
<%@ include file="../common/common_include.jsp"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%
	FaqForm form = (FaqForm)request.getAttribute("command");
	String tab = form.getTab();
	UserInfo user = (UserInfo)SecurityContextHolder.getContext().getAuthentication().getPrincipal();
%>

<div id="childLayout" class="easyui-layout" data-options="fit:true">
	<div data-options="region:'west',split:true,maxWidth:220,collapsible:true,style:{borderWidth:2},onResize:function(){XF.LAYOUT.resizeWest();}" style="background: #f7f7f9;width:220px;" title=" ">
		 <div class="sidebar">
			<div id="sidebar" class="easyui-accordion" style="width:auto;height:auto;">
				<div title="FAQ"  style="overflow:auto;padding:10px;">  
					<ul class="site-ul">
						<li class="site-li">
							<a s="listFaq" href="javascript:XF.Faq.listFaq()"><span>查看FAQ</span></a>
						</li>
						<sec:authorize ifAllGranted="ADD_FAQ">
							<li class="site-li">
								<a s="addFaqC" href="javascript:XF.Faq.addFaq('常见问题','addFaqC')"><span>添加常见问题</span></a>
							</li>
							<li class="site-li">
								<a s="addFaqF" href="javascript:XF.Faq.addFaq('服务指南','addFaqF')"><span>添加服务指南</span></a>
							</li>
						</sec:authorize>
						<sec:authorize ifAnyGranted="EDIT_FAQ,DELETE_FAQ">										
							<li class="site-li">
								<a s="manageFaq" href="javascript:XF.Faq.manageFaq()"><span>管理FAQ</span></a>
							</li>
						</sec:authorize>
					</ul>
				</div>

			</div> 
		</div>
	</div>
	<div id="faqCenter" class="settingCenter" data-options="region:'center'" >
	</div>
</div>
<script type="text/javascript">
	$(function(){
		$('#childLayout').layout();
		XF.NAV.activeTab('"<%=tab%>"');
	    $('#sidebar').accordion({
	        animate:true
	    });
	    XF.Faq.listFaq();
	});
</script>
</html>